diff options
Diffstat (limited to 'packages/web/app/dashboard/lists/[listId]')
3 files changed, 16 insertions, 13 deletions
diff --git a/packages/web/app/dashboard/lists/[listId]/components/DeleteListButton.tsx b/packages/web/app/dashboard/lists/[listId]/components/DeleteListButton.tsx index 8961b2d0..32a7facf 100644 --- a/packages/web/app/dashboard/lists/[listId]/components/DeleteListButton.tsx +++ b/packages/web/app/dashboard/lists/[listId]/components/DeleteListButton.tsx @@ -1,9 +1,10 @@ +"use client"; + import { Button } from "@/components/ui/button"; import { Dialog, DialogClose, DialogContent, - DialogDescription, DialogFooter, DialogHeader, DialogTitle, diff --git a/packages/web/app/dashboard/lists/[listId]/components/ListView.tsx b/packages/web/app/dashboard/lists/[listId]/components/ListView.tsx index c3d49b6a..6489e9f0 100644 --- a/packages/web/app/dashboard/lists/[listId]/components/ListView.tsx +++ b/packages/web/app/dashboard/lists/[listId]/components/ListView.tsx @@ -4,7 +4,6 @@ import BookmarksGrid from "@/app/dashboard/bookmarks/components/BookmarksGrid"; import { ZBookmark } from "@/lib/types/api/bookmarks"; import { ZBookmarkListWithBookmarks } from "@/lib/types/api/lists"; import { api } from "@/lib/trpc"; -import DeleteListButton from "./DeleteListButton"; export default function ListView({ bookmarks, @@ -21,15 +20,6 @@ export default function ListView({ ); return ( - <div className="container flex flex-col gap-3"> - <div className="flex justify-between"> - <span className="pt-4 text-2xl"> - {data.icon} {data.name} - </span> - <DeleteListButton list={data} /> - </div> - <hr /> - <BookmarksGrid query={{ ids: data.bookmarks }} bookmarks={bookmarks} /> - </div> + <BookmarksGrid query={{ ids: data.bookmarks }} bookmarks={bookmarks} /> ); } diff --git a/packages/web/app/dashboard/lists/[listId]/page.tsx b/packages/web/app/dashboard/lists/[listId]/page.tsx index b8ca79c3..397a0f1e 100644 --- a/packages/web/app/dashboard/lists/[listId]/page.tsx +++ b/packages/web/app/dashboard/lists/[listId]/page.tsx @@ -3,6 +3,7 @@ import { getServerAuthSession } from "@/server/auth"; import { TRPCError } from "@trpc/server"; import { notFound, redirect } from "next/navigation"; import ListView from "./components/ListView"; +import DeleteListButton from "./components/DeleteListButton"; export default async function ListPage({ params, @@ -28,5 +29,16 @@ export default async function ListPage({ const bookmarks = await api.bookmarks.getBookmarks({ ids: list.bookmarks }); - return <ListView list={list} bookmarks={bookmarks.bookmarks} />; + return ( + <div className="container flex flex-col gap-3"> + <div className="flex justify-between"> + <span className="pt-4 text-2xl"> + {list.icon} {list.name} + </span> + <DeleteListButton list={list} /> + </div> + <hr /> + <ListView list={list} bookmarks={bookmarks.bookmarks} /> + </div> + ); } |
